//
//  LXNavgationController.m
//  SevenFM
//
//  Created by seven on 2018/3/29.
//  Copyright © 2018年 seven. All rights reserved.
//

#import "LXNavgationController.h"
#import "LXNavigationBar.h"

@interface LXNavgationController ()

@end

@implementation LXNavgationController

-(instancetype)initWithNavigationBarClass:(Class)navigationBarClass toolbarClass:(Class)toolbarClass {
    if (self = [super initWithNavigationBarClass:navigationBarClass toolbarClass:toolbarClass]) {
        [self setValue:[[LXNavigationBar alloc]init] forKey:@"navigationBar"];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}
- (void)back {
    [self popViewControllerAnimated:YES];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.childViewControllers.count > 0) {
        viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"btn_back_n"] style:0 target:self action:@selector(back)];
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:YES];
    if (viewController.view.tag == 666) {
        viewController.view.tag == 888;
    }
}
@end
